<figure class="figure">
  <a
    {% if include.link %}
      href="{{ include.link | relative_url | uri_escape }}"
    {% endif %}
    class="figure-image"
    aria-label="{{ include.caption | default: "figure link" | regex_strip }}"
  >
    <img
      src="{{ include.image | relative_url | uri_escape }}"
      style="
        width: {{ include.width | default: "auto" }};
        max-height: {{ include.height | default: "unset" }};
      "
      alt="{{ include.caption | default: "figure image" | regex_strip }}"
      loading="lazy"
      {% include fallback.html %}
    >
  </a>
  {% if include.caption %}
    <figcaption class="figure-caption">
      {{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}
    </figcaption>
  {% endif %}
</figure>
